sort $isid_vars
capture drop sample
gen sample=(S_pds==1 & n_ud==1)  

tabstat WR_o if sample==1 & mu_o_B!=., stat(count mean p50 p10 p25 p75 p90 sd)
tabstat p_sbjo if sample==1 & mu_o_B!=., stat(count mean p50 p10 p25 p75 p90 sd)
tabstat p_inpf_sbjo if sample==1 & mu_o_B!=., stat(count mean p50 p10 p25 p75 p90 sd)
tabstat mc_o_B if sample==1 & mu_o_B!=., stat(count mean p50 p10 p25 p75 p90 sd)
tabstat mu_o_B if sample==1 & mu_o_B!=., stat(count mean p50 p10 p25 p75 p90 sd)
tabstat markup_level if sample==1 & mu_o_B!=., stat(count mean p50 p10 p25 p75 p90 sd) 